🎖️GitЯра🎖️
Commit 26582710ba6728ce4663a292f7399a4ca75dc8a9
Parents : 99d5d1a
Author : James Rich <2199651+jamesarich@users.noreply.github.com>
Signature : Signature validation error
Date : 2026-07-22T17:04:56-05:00
Committer : GitHub <noreply@github.com>
Date : 2026-07-22T22:04:56Z
fix(node): stop metric-card trailing values crushing to one-char-per-line (#6374)
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Changes
3 files changed, 37 insertions(+), 8 deletions(-)
Diff
diff --git a/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/metrics/DeviceMetrics.kt b/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/metrics/DeviceMetrics.kt
index 74c8369456..82e0704d6b 100644
--- a/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/metrics/DeviceMetrics.kt
+++ b/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/metrics/DeviceMetrics.kt
@@ -20,6 +20,7 @@ package org.meshtastic.feature.node.metrics
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
+import androidx.compose.foundation.layout.FlowRow
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxHeight
@@ -444,8 +445,15 @@ private fun DeviceMetricsCard(
Spacer(modifier = Modifier.height(8.dp))
- /* Channel Utilization and Air Utilization Tx */
- Row(modifier = Modifier.fillMaxWidth(), horizontalArrangement = Arrangement.SpaceBetween) {
+ /* Channel Utilization / Air Utilization Tx, and Uptime */
+ // FlowRow(SpaceBetween) so the uptime stays pinned right when it fits and drops onto its own line when the
+ // (localized) labels don't fit, instead of being crushed and wrapped one character per line.
+ FlowRow(
+ modifier = Modifier.fillMaxWidth(),
+ horizontalArrangement = Arrangement.SpaceBetween,
+ verticalArrangement = Arrangement.spacedBy(4.dp),
+ itemVerticalAlignment = Alignment.CenterVertically,
+ ) {
Row(verticalAlignment = Alignment.CenterVertically) {
if (deviceMetrics?.channel_utilization != null) {
MetricValueRow(
diff --git a/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/metrics/PositionLogComponents.kt b/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/metrics/PositionLogComponents.kt
index c761c4ab1f..6c809c1f17 100644
--- a/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/metrics/PositionLogComponents.kt
+++ b/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/metrics/PositionLogComponents.kt
@@ -20,6 +20,7 @@ package org.meshtastic.feature.node.metrics
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
+import androidx.compose.foundation.layout.FlowRow
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxWidth
@@ -82,10 +83,13 @@ fun PositionCard(
Spacer(modifier = Modifier.height(8.dp))
/* Coordinates */
- Row(
+ // FlowRow(SpaceBetween) so "Sats" stays pinned right when it fits and drops onto its own line when the
+ // (localized) coordinate labels don't fit, instead of being crushed and wrapped one character per line.
+ FlowRow(
modifier = Modifier.fillMaxWidth(),
horizontalArrangement = Arrangement.SpaceBetween,
- verticalAlignment = Alignment.CenterVertically,
+ verticalArrangement = Arrangement.spacedBy(4.dp),
+ itemVerticalAlignment = Alignment.CenterVertically,
) {
Row(verticalAlignment = Alignment.CenterVertically) {
MetricValueRow(color = GraphColors.Blue, text = "${stringResource(Res.string.latitude)}: $latitude")
@@ -105,10 +109,13 @@ fun PositionCard(
Spacer(modifier = Modifier.height(4.dp))
/* Alt, Speed, Heading */
- Row(
+ // FlowRow(SpaceBetween) so "Heading" stays pinned right when it fits and drops onto its own line when the
+ // (localized) labels don't fit, instead of being crushed and wrapped one character per line.
+ FlowRow(
modifier = Modifier.fillMaxWidth(),
horizontalArrangement = Arrangement.SpaceBetween,
- verticalAlignment = Alignment.CenterVertically,
+ verticalArrangement = Arrangement.spacedBy(4.dp),
+ itemVerticalAlignment = Alignment.CenterVertically,
) {
Row(verticalAlignment = Alignment.CenterVertically) {
MetricValueRow(
diff --git a/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/metrics/SignalMetrics.kt b/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/metrics/SignalMetrics.kt
index 1007932c2c..584e12d87a 100644
--- a/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/metrics/SignalMetrics.kt
+++ b/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/metrics/SignalMetrics.kt
@@ -482,7 +482,14 @@ private fun LocalStatsCard(telemetry: Telemetry, isSelected: Boolean, onClick: (
Spacer(modifier = Modifier.height(8.dp))
- Row(modifier = Modifier.fillMaxWidth(), horizontalArrangement = Arrangement.SpaceBetween) {
+ // FlowRow(SpaceBetween): the relays stat wraps to its own line when the traffic label is too long,
+ // instead of being crushed and wrapped one character per line.
+ FlowRow(
+ modifier = Modifier.fillMaxWidth(),
+ horizontalArrangement = Arrangement.SpaceBetween,
+ verticalArrangement = Arrangement.spacedBy(4.dp),
+ itemVerticalAlignment = Alignment.CenterVertically,
+ ) {
Text(
text =
stringResource(
@@ -506,7 +513,14 @@ private fun LocalStatsCard(telemetry: Telemetry, isSelected: Boolean, onClick: (
Spacer(modifier = Modifier.height(4.dp))
- Row(modifier = Modifier.fillMaxWidth(), horizontalArrangement = Arrangement.SpaceBetween) {
+ // FlowRow(SpaceBetween): the uptime stat wraps to its own line when the nodes label is too long,
+ // instead of being crushed and wrapped one character per line.
+ FlowRow(
+ modifier = Modifier.fillMaxWidth(),
+ horizontalArrangement = Arrangement.SpaceBetween,
+ verticalArrangement = Arrangement.spacedBy(4.dp),
+ itemVerticalAlignment = Alignment.CenterVertically,
+ ) {
Text(
text =
stringResource(
Served by rngit 1.5.4 - Generated in 0.06s